# Contributor:
# Maintainer:
pkgname=uvncrepeater
pkgver=014
pkgrel=11
pkgdesc="VNC repeater based on ultravnc repeater"
url="http://koti.mbnet.fi/jtko/"
arch="all"
license="GPL-2.0-or-later"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="http://distcache.freebsd.org/ports-distfiles/repeater$pkgver.zip
	uvncrepeater.confd
	uvncrepeater.initd"
builddir="$srcdir/Ver$pkgver"
options="!check"

prepare() {
	default_prepare
	# respect our CXX and CFLAGS
	sed -i -e 's/g++/$(CXX)/g' \
		-e "/^CFLAGS/d" Makefile
}

build() {
	make
}

package() {
	install -Dm755 repeater "$pkgdir"/usr/bin/repeater
	install -Dm644 uvncrepeater.ini "$pkgdir"/etc/uvncrepeater.ini
	install -Dm755 "$srcdir"/uvncrepeater.initd "$pkgdir"/etc/init.d/uvncrepeater
	install -Dm644 "$srcdir"/uvncrepeater.confd "$pkgdir"/etc/conf.d/uvncrepeater
}

sha512sums="5b74943fef5b41202ad693c0d81e0f2f9a59c397ee9818da8c7e91dbee15f4309e3e9b32ad0d8ff8db5d7679fd8caa8e4e448d5f717393e45743705d106fede7  repeater014.zip
b6a30b6bfbc47b7f3988abd8e6e65bfc97baf9d7bd80f72cd71506b779d6650cc32333e66bd5cfd1995e1e48473185e4619664cc3bfbf3efe73af393822f3068  uvncrepeater.confd
f1028c2dbbe7a17758c9553b0f8094e311f04317c09b1a2c2c521cc9e651d0ae9b263f1614f2dd9b51358f98c29e25922ed4e9e095bd4bbb9f18c80082f803e9  uvncrepeater.initd"
